-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add stats for shopify Id resolution #2885
Conversation
WalkthroughThe changes involve the introduction of a new metric to track Shopify anonymous ID resolutions within a Prometheus class, and updates to the Changes
TipsChat with CodeRabbit Bot (
|
@coderabbitai review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- src/util/prometheus.js (1 hunks)
- src/v0/sources/shopify/transform.js (1 hunks)
- src/v0/sources/shopify/util.js (2 hunks)
Additional comments: 6
src/util/prometheus.js (1)
- 487-495: The addition of the 'shopify_anon_id_resolve' metric with label names ['method', 'writeKey', 'shopifyTopic'] aligns with the PR objectives and the summary provided.
src/v0/sources/shopify/transform.js (3)
175-181: The changes to the
getAnonymousIdAndSessionId
function call to includeshopifyTopic
in the object along withmetricMetadata
align with the PR objectives and the provided summaries. This ensures that the metric tracking for Shopify ID resolution includes the topic of the Shopify event, which is crucial for the new metrics being introduced.175-181: The logic for setting
anonymousId
andsessionId
on the message object after resolving them throughgetAnonymousIdAndSessionId
is consistent with the expected behavior for tracking and is not mentioned as changed in the summary. This suggests that the behavior is preserved from the previous implementation, which is good for maintaining existing functionality while adding the new metric tracking.175-181: > Note: This review was outside the patches, and no patch overlapping with it was found. Original lines [1-174]
The rest of the file appears to be consistent with the PR objectives and the summaries provided. There are no additional changes that would affect the new metric tracking functionality or any other existing functionality.
Also applies to: 182-308
src/v0/sources/shopify/util.js (2)
164-171: The addition of metric incrementation based on the 'note_attributes' method is consistent with the PR objectives to track the resolution of Shopify IDs.
195-204: The addition of metric incrementation based on the 'database' method aligns with the PR objectives to differentiate the source of ID resolution.
Kudos, SonarCloud Quality Gate passed! |
What are the changes introduced in this PR?
Adding shopify ID Resolution stats based on shopifyTopic and method
Write a brief explainer on your code changes.
Added some stats to check from where the ID is getting resolved either from
note_attributes
sent by shopify or from ourdb
event wisePlease explain the objectives of your changes below
This will help us to know if we can remove the mapping in db after a particular event has taken place (Order Created)
Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here
Type of change
Chore
Existing capabilities/behavior
New capabilities/behavior
If the pull request is a new feature,
Any technical or performance related pointers to consider with the change?
N/A
Any new dependencies introduced with this change?
N/A
Any new generic utility introduced or modified. Please explain the changes.
N/A
If the PR has changes in more than 10 files, please mention why the changes were not split into multiple PRs.
N/A
If multiple linear tasks are associated with the PR changes, please elaborate on the reason:
N/A
Developer checklist
No breaking changes are being introduced.
Are all related docs linked with the PR?
Are all changes manually tested?
Does this change require any documentation changes?
Are relevant unit and component test-cases added?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.
Summary by CodeRabbit
New Features
Enhancements
Bug Fixes